package temp

import (
	"background/model/back/entity"
)

type Knowledge struct {
	ID       uint   `gorm:"primarykey"`
	Title    string `gorm:"column:title;comment:'名称';type:varchar(255)"   json:"title"`
	Category int8   `gorm:"column:category;comment:'分类';type:smallint"   json:"category"`
	Content  string `gorm:"column:content;comment:'内容';type:varchar(900)" json:"content"`
	Language string `gorm:"column:language;comment:'语言';type:varchar(255)" json:"language"`
	Show     bool   `gorm:"column:show;comment:'可用0false,1true';type:smallint"   json:"show"`
	Sort     uint   `gorm:"column:sort;comment:'可用0false,1true';type:smallint"   json:"sort"`
}

func (c Knowledge) TableName() string {
	return entity.ProjectPre + "knowledge"
}

//https://cokecloud.net/api/v1/user/knowledge/fetch?language=zh-CN&id=2
